
def is_internet(ip : str): # 是公网ip吗？
    ip_list=[]
    ip_list=ip.split(".")
    if ip_list[0] == "100" or ip_list[0] == "10":
        return False
    elif ip_list[0] == "192" and ip_list[1] == "168":
        return False
    elif ip_list[0] == "172":
        if int(ip_list[1]) >= 16 and int(ip_list[1]) <= 31:
            return False
        else:
            return True
    elif ip_list == ["127","0","0","1"] or ip_list == ["0","0","0","0"]:
        return False
    else:
        return True

print(is_internet("172.22.84.12"))